﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BBPA.Admin.SYS.Orders.Money
{
    public partial class List : ListPage
    {
        BLL.V_Orders bllList = new BLL.V_Orders();
        BLL.Orders bll = new BLL.Orders();
        protected void Page_Load(object sender, EventArgs e)
        {
            Master.show_btn_add =  Master.show_edit = false;
            Master.show_listControls = Master.show_formControls = true;
            Master.txt_btn_bat_del = "作废";
            //Master.BasicSQL = "State=" + (int)EnumHelper.OrdersState.WaitMoney + "   and datediff(day,ExpectBuyDate,getdate())=-1 ";
            Master.BasicSQL = "State=" + (int)EnumHelper.OrdersState.OrderSub;
            Master.orderBy = "State";
            Master.descasc = "asc";
        }
        public override void buildSQL_Page_List_search()
        {
        }
        public override DataSet get_Page_DataSet(string sql_, string orderby_, int pageFrom_, int pageTo_) { return bllList.GetListByPage(sql_, orderby_, pageFrom_, pageTo_); }
        //

        public override void del_Page_List(string inStr_)
        {
            foreach (string id in inStr_.Split(','))
            {
                int thisID = DataTypePlus.requestInt(id);
                Maticsoft.DBUtility.DbHelperSQL.ExecuteSql("update  Orders set State=8  where  id=" + thisID);
                //
                BLL.User_Operate_Log.Add(Security.GetCurrentUserID(), EnumHelper.TableName.Orders, thisID, EnumHelper.OperateType.Update, "");
                
            }
        }
    }
}